# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

_gitname=zxcvbn-python
pkgname=python-zxcvbn
pkgver=4.4.28
pkgrel=3
pkgdesc="Python implementation of Dropbox's realistic password strength estimator"
url='https://github.com/dwolfhub/zxcvbn-python'
arch=('any')
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('be85f976dcf685e2885edff116147cc4549f9c86dee4317b61b84dc4f36ab2c8c2f3468d5d1a55e8890693c852a09104b14360f9ce43feb3727f8fc164eb78f1')
b2sums=('e3baf57df00819243f9588c8203598b14b9f03e0a232d53152584b3b74872baef7050fdf8f11f25e8a8776e2e4a7a0af15c9045f07700fe686c6cb021f794f2b')

build() {
  cd ${_gitname}-${pkgver}
  python setup.py build
}

check() {
  cd ${_gitname}-${pkgver}
  py.test
}

package() {
  cd ${_gitname}-${pkgver}
  python setup.py install --root="${pkgdir}" -O1 --skip-build
  install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.rst  -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
